package zhao.exmaple.watearkDemo;

import org.apache.flink.api.common.functions.RichMapFunction;

public class WaterSensorMapFunction extends RichMapFunction<String, WaterSensor> {

    @Override
    public WaterSensor map(String value) throws Exception {
        String[] split = value.split(",");
        WaterSensor waterSensor = new WaterSensor(split[0], Long.valueOf(split[1]), Integer.valueOf(split[2]));
        return waterSensor;
    }
}
